{weiget frontend_weiget/header}

	 <section>
         <!-- Page content-->
         <div class="content-wrapper">
            <h3>更新工作流
               <small>主要是工作提交审批</small>
            </h3>
            <!-- START panel-->
            <div class="panel panel-default">
               <div class="panel-body">
                  <form method="post" action="{SELF_URL}former/updateworkflow/?id={$workflowInfo[workflowid]}" class="form-horizontal">
                     <fieldset>
                        <legend>基础信息</legend>
                        <div class="form-group">
                           <label class="col-sm-2 control-label">唯一标记</label>
                           <div class="col-sm-6">
                              <input type="text" placeholder="必须输入英文" name="workflow[keyname]" class="form-control form-control-rounded" data-parsley-minlength="4" value="{$workflowInfo[keyname]}">
                           </div>
                           <div class="col-sm-4"></div>
                        </div>
                     </fieldset>
                     <fieldset>
                        <div class="form-group">
                           <label class="col-sm-2 control-label">原型</label>
                           <div class="col-sm-6">
                              <select name="workflow[prototypeid]" class="chosen-select form-control">
							  <!--{loop $prototypeInfos $prototypeInfo}-->
							  <!--{if $workflowInfo[prototypeid] == $prototypeInfo[prototypeid]}-->
                                 <option value="{$prototypeInfo[prototypeid]}" selected="selected"><!--{$prototypeInfo[title]}--></option>
							  <!--{else}-->
                                 <option value="{$prototypeInfo[prototypeid]}"><!--{$prototypeInfo[title]}--></option>
							  <!--{/if}-->
							  <!--{/loop}-->
                              </select>
                           </div>
                           <div class="col-sm-4"></div>
                        </div>
                     </fieldset>
                     <fieldset>
                        <div class="form-group">
                           <label class="col-sm-2 control-label">名称</label>
                           <div class="col-sm-6">
                              <input type="text" placeholder="不能为空，最好是中文" name="workflow[title]" class="form-control" data-parsley-minlength="4" value="{$workflowInfo[title]}">
                           </div>
                           <div class="col-sm-4"></div>
                        </div>
                     </fieldset>
                     <fieldset>
                        <div class="form-group">
                           <label class="col-sm-2 control-label">通过去向</label>
                           <div class="col-sm-6">
                              <select name="workflow[after]" class="chosen-select form-control">
                                 <option value="0">请选择</option>
							  <!--{loop $workflowInfos $workflow}-->
							  <!--{if $workflowInfo[after] == $workflow[workflowid]}-->
                                 <option value="{$workflow[workflowid]}" selected="selected"><!--{$workflow[keyname]}--> - <!--{$workflow[title]}--></option>
							  <!--{else}-->
                                 <option value="{$workflow[workflowid]}"><!--{$workflow[keyname]}--> - <!--{$workflow[title]}--></option>
							  <!--{/if}-->
							  <!--{/loop}-->
                              </select>
                           </div>
                           <div class="col-sm-4"></div>
                        </div>
                     </fieldset>
                     <fieldset>
                        <div class="form-group">
                           <label class="col-sm-2 control-label">拒绝去向</label>
                           <div class="col-sm-6">
                              <select name="workflow[before]" class="chosen-select form-control">
                                 <option value="0">请选择</option>
							  <!--{loop $workflowInfos $workflow}-->
							  <!--{if $workflowInfo[before] == $workflow[workflowid]}-->
                                 <option value="{$workflow[workflowid]}" selected="selected"><!--{$workflow[keyname]}--> - <!--{$workflow[title]}--></option>
							  <!--{else}-->
                                 <option value="{$workflow[workflowid]}"><!--{$workflow[keyname]}--> - <!--{$workflow[title]}--></option>
							  <!--{/if}-->
							  <!--{/loop}-->
                              </select>
                           </div>
                           <div class="col-sm-4"></div>
                        </div>
                     </fieldset>
                     <fieldset>
                        <div class="form-group">
                           <label class="col-sm-2 control-label">操作员</label>
                           <div class="col-sm-6">
                              <select name="workflow[uid]" class="chosen-select form-control">
                                 <option value="0">请选择</option>
							  <!--{loop $userInfos $userInfo}-->
							  <!--{if $workflowInfo[uid] == $userInfo[uid]}-->
                                 <option value="{$userInfo[uid]}" selected="selected"><!--{$userInfo[username]}-->[<!--{$userInfo[truename]}-->]</option>
							  <!--{else}-->
                                 <option value="{$userInfo[uid]}"><!--{$userInfo[username]}-->[<!--{$userInfo[truename]}-->]</option>
							  <!--{/if}-->
							  <!--{/loop}-->
                              </select>
                           </div>
                           <div class="col-sm-4"></div>
                        </div>
                     </fieldset>
                     <fieldset>
                        <div class="form-group">
                           <label class="col-sm-2 control-label">组织机构</label>
                           <div class="col-sm-6">
                              <select name="workflow[organizationid]" class="chosen-select form-control">
                                 <option value="0">请选择</option>
							  <!--{loop $organizations $organization}-->
							  <!--{if $workflowInfo[organizationid] == $organization[organizationid]}-->
                                 <option value="{$organization[organizationid]}" selected="selected"><!--{$organization[name]}--></option>
							  <!--{else}-->
                                 <option value="{$organization[organizationid]}"><!--{$organization[name]}--></option>
							  <!--{/if}-->
							  <!--{/loop}-->
                              </select>
                           </div>
                           <div class="col-sm-4"></div>
                        </div>
                     </fieldset>
                     <fieldset>
                        <div class="form-group">
                           <label class="col-sm-2 control-label">角色</label>
                           <div class="col-sm-6">
                              <select name="workflow[roleid]" class="chosen-select form-control">
                                 <option value="0">请选择</option>
							  <!--{loop $aclroles $aclrole}-->
							  <!--{if $workflowInfo[roleid] == $aclrole[rid]}-->
                                 <option value="{$aclrole[rid]}" selected="selected"><!--{$aclrole[name]}--></option>
							  <!--{else}-->
                                 <option value="{$aclrole[rid]}"><!--{$aclrole[name]}--></option>
							  <!--{/if}-->
							  <!--{/loop}-->
                              </select>
                           </div>
                           <div class="col-sm-4"></div>
                        </div>
                     </fieldset>
                     <fieldset>
                        <div class="form-group">
                           <label class="col-sm-2 control-label">可见字段</label>
                           <div class="col-sm-6">
                              <select name="workflow[fieldshow][]" multiple class="chosen-select form-control">
							  <!--{loop $fieldInfos $fieldInfo}-->
								<!--{php $hasid = 0;}-->
								<!--{loop $workflowInfo[fieldshow] $fieldshowid}-->
									<!--{if $fieldshowid == $fieldInfo[fieldid]}-->
										<!--{php $hasid = 1;}-->
									<!--{/if}-->
								<!--{/loop}-->
								<!--{if $hasid == 1}-->
									<option value="{$fieldInfo[fieldid]}" selected="selected"><!--{$fieldInfo[name]}-->[<!--{$fieldInfo[title]}-->]</option>
								<!--{else}-->
									<option value="{$fieldInfo[fieldid]}"><!--{$fieldInfo[name]}-->[<!--{$fieldInfo[title]}-->]</option>
								<!--{/if}-->
							  <!--{/loop}-->
							  </select>
                           </div>
                           <div class="col-sm-4"></div>
                        </div>
                     </fieldset>
                     <fieldset>
                        <div class="form-group">
                           <label class="col-sm-2 control-label">隐藏字段</label>
                           <div class="col-sm-6">
                              <select name="workflow[fieldhidden][]" multiple class="chosen-select form-control">
							  <!--{loop $fieldInfos $fieldInfo}-->
								<!--{php $hasid = 0;}-->
								<!--{loop $workflowInfo[fieldhidden] $fieldhiddenid}-->
									<!--{if $fieldhiddenid == $fieldInfo[fieldid]}-->
										<!--{php $hasid = 1;}-->
									<!--{/if}-->
								<!--{/loop}-->
								<!--{if $hasid == 1}-->
									<option value="{$fieldInfo[fieldid]}" selected="selected"><!--{$fieldInfo[name]}-->[<!--{$fieldInfo[title]}-->]</option>
								<!--{else}-->
									<option value="{$fieldInfo[fieldid]}"><!--{$fieldInfo[name]}-->[<!--{$fieldInfo[title]}-->]</option>
								<!--{/if}-->
							  <!--{/loop}-->
                              </select>
                           </div>
                           <div class="col-sm-4"></div>
                        </div>
                     </fieldset>

                     <fieldset>
                        <div class="form-group">
                           <div class="col-sm-4 col-sm-offset-2">
						   <input type="hidden" name="dosubmit" value="1">
                              <button type="submit" class="btn btn-primary">保存</button>
                           </div>
                        </div>
                     </fieldset>
                  </form>
               </div>
            </div>
            <!-- END panel-->
         </div>
      </section>

{weiget frontend_weiget/footer}